
package com.suixuan.support.util.web.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.suixuan.support.util.ConstantUtils;

/**
 * 
 * @Copyright (c) Nanjing Zhou Su co.,Ltd
 * 
 * @Project zhousuframework
 * @Title TreeVo.java
 * @Package com.suixuan.support.util.web.vo
 * @Description 对ZS Tree格式的Json封装
 * @Author suixuan
 * @Editors 1
 * @Date 2010-11-22 上午08:55:21
 * @Note
 * @Version:1.0.0
 * @param <T>
 * 
 */
public final class TreeVo implements Serializable {
	
	private static final long serialVersionUID = 1349347966300288041L;
	
	/**
	 * 
	 * @Copyright (c) Nanjing Zhou Su co.,Ltd
	 * 
	 * @Project zhousuframework
	 * @Title TreeVo.java
	 * @Package com.suixuan.support.util.web.vo
	 * @Description 自定义Attribute类
	 * @Author suixuan
	 * @Editors 1
	 * @Date 2010-11-22 上午08:56:13
	 * @Note
	 * @Version:1.0.0
	 * 
	 */
	public static class Attr implements Serializable {
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 6362342047603346481L;
		
		private String key;
		
		private String value;
		
		public String getKey() {

			return key;
		}
		
		protected void setKey(String key) {

			this.key = key;
		}
		
		public String getValue() {

			return value;
		}
		
		protected void setValue(String value) {

			this.value = value;
		}
		
		public Attr(String key, String value) {

			super();
			this.key = key;
			this.value = value;
		}
		
		public Attr() {

			super();
		}
		
	}
	
	protected String id;
	
	/**
	 * 树形菜单显示标题
	 */
	protected String title = ConstantUtils.EMPTY_STRING;
	
	/**
	 * li上显示自定义attribute
	 */
	protected List<Attr> attr = new ArrayList<Attr>();
	
	/**
	 * 子节点
	 */
	protected List<TreeVo> children = new ArrayList<TreeVo>();
	
	/**
	 * @return the Field id
	 */
	public String getId() {

		return id;
	}
	
	/**
	 * @param the
	 *            Field id to set
	 */
	public void setId(String id) {

		this.id = id;
	}
	
	public String getTitle() {

		return title;
	}
	
	public void setTitle(String title) {

		this.title = title;
	}
	
	public List<Attr> getAttr() {

		return attr;
	}
	
	public void setAttr(List<Attr> attr) {

		this.attr = attr;
	}
	
	public List<TreeVo> getChildren() {

		return children;
	}
	
	public void setChildren(List<TreeVo> children) {

		this.children = children;
	}
	
	public TreeVo() {

		super();
	}
	
	public TreeVo(String id, String title) {

		super();
		this.id = id;
		this.title = title;
	}
	
	public TreeVo(String id, String title, List<Attr> attr) {

		super();
		this.id = id;
		this.title = title;
		this.attr = attr;
	}
	
	public TreeVo(String id, String title, List<Attr> attr, List<TreeVo> children) {

		super();
		this.id = id;
		this.title = title;
		this.attr = attr;
		this.children = children;
	}
	
}
